package fileDemo;

import java.io.File;
import java.io.IOException;

public class Demo3 {
    public static void main(String[] args) throws IOException, InterruptedException {
        File file=new File("D:/Project/java/java-biog/" +
                "Day20250312/hello.txt");
        if(!file.exists()){
            boolean file1=file.createNewFile();
            System.out.println("file文件创建成功："+file1);
        }

        Thread.sleep(6000);
        file.deleteOnExit();
    }
}
